﻿@model AdminsUpdateViewModel

@{
    ViewBag.Title = "修改管理员信息";
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Update</title>
</head>
<body>

    <div class="row">
    <div class="col-md-10 col-md-offset-1">
        <div class="panel panel-headline">
            <div class="panel-heading">
                <h3 class="panel-title">编辑管理员信息</h3>
            </div>
            <div class="panel-body">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-md-8">
                            <form method="post" enctype="multipart/form-data">
                                <div class="form-group">
                                    @Html.HiddenFor(a => a.Id)
                                </div>
                                <div class="form-group">
                                    <label for="NickName">真实姓名:</label>
                                    <input asp-for="NickName" class="form-control" />
                                    <span asp-validation-for="NickName" class="text-danger"></span>
                                </div>
                                <div class="form-group">
                                    <label for="Birthday">出生日期:</label>
                                    <input asp-for="Birthday" class="form-control" />
                                    <span asp-validation-for="Birthday" class="text-danger"></span>
                                </div>
                                <div class="form-group">
                                    <label for="Title">性别:</label>
                                    @if (Model.Gender == 1)
                                    {
                                        <label class="radio-inline">
                                            <input type="radio" name="Gender" value="1" checked /> 男
                                        </label>
                                        <label class="radio-inline">
                                            <input type="radio" name="Gender" value="0" /> 女
                                        </label>
                                    }
                                    else
                                    {
                                        <label class="radio-inline">
                                            <input type="radio" name="Gender" value="1" /> 男
                                        </label>
                                        <label class="radio-inline">
                                            <input type="radio" name="Gender" value="0" checked /> 女
                                        </label>

                                    }
                                </div>
                                <div class="form-group">
                                    <label for="Tel">联系电话:</label>
                                    <input asp-for="Tel" class="form-control" />
                                    <span asp-validation-for="Tel" class="text-danger"></span>
                                </div>
                                <div class="form-group">
                                    <label for="Email">邮箱地址:</label>
                                    <input asp-for="Email" class="form-control" />
                                    <span asp-validation-for="Email" class="text-danger"></span>
                                </div>
                                <div class="form-group">
                                    <label for="QQNumber">QQ号码:</label>
                                    <input asp-for="QQNumber" class="form-control" />
                                    <span asp-validation-for="QQNumber" class="text-danger"></span>
                                </div>
                                <div class="form-group">
                                    <label for="Address">家庭住址:</label>
                                    <input asp-for="Address" class="form-control" />
                                    <span asp-validation-for="Address" class="text-danger"></span>
                                </div>
                                <div class="form-group">
                                    <label for="file">头像:</label>
                                    <input type="file" name="image" />
                                    @Html.HiddenFor(a => a.Photo)
                                    <img src="~/ImageHead/Admins/@Model.Photo" style="width:100px;height:100px;" />
                                </div>

                                <div class="form-group">
                                    <label for="Pwd">密码:</label>
                                    <input asp-for="Pwd" class="form-control" />
                                    <span>
                                        <input type="text" name="Pwd" value="@Model.Pwd" readonly />
                                    </span>
                                    <span asp-validation-for="Pwd" class="text-danger"></span>
                                </div>

                                <div class="form-group">
                                    <label for="RolesId">权限信息</label>
                                    @Html.DropDownList("RolesId",(SelectList)ViewBag.RolesList,new{@class="form-control"})
                                </div>
                                

                                <div class="form-group">
                                    <button class="btn btn-primary">提交</button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

</body>
</html>
